import QRCode from 'qrcode';

export default function (href) {
    return new Promise((resolve, reject) => {
        QRCode.toDataURL(String(href), { type: 'terminal' }, (err, url) => {
            if (err) reject(err);
            resolve(url);
        });
    });
}
